package com.example.demo.dao;

import com.example.demo.entity.PurchaseHistoryEntity;
import com.example.demo.vo.PurchaseHistoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PurchaseHistoryDao {
    List<PurchaseHistoryEntity> getPurchaseHistoryByUserId(@Param("user_id") int user_id);
    PurchaseHistoryEntity getPurchaseHistoryById(@Param("id") int id);
    int addPurchaseHistory(@Param("purchaseHistoryVo") PurchaseHistoryVo purchaseHistoryVo);
    int delPurchaseHistory(@Param("id") int id);
    int updatePurchaseHistory(@Param("purchaseHistoryVo") PurchaseHistoryVo purchaseHistoryVo);
    List<PurchaseHistoryEntity> getAllPurchaseHistories();
}